# coding:utf-8
import urllib

class Record(object):
    def __init__(self, origin_list):
        """origin_list: line.split('\x01')
        None：""
        """
        self.id = int(origin_list[0])
        self.relative_days = int(origin_list[1])
        self.cookie = origin_list[2]
        self.ip = origin_list[3]
        self.idfa = origin_list[4]  # IOS 广告标示符
        self.imei = origin_list[5]  # 国际移动设备标识
        self.android = origin_list[6]  # 设备对应的android值
        self.openudid = origin_list[7]  # IOS openudid
        self.mac = origin_list[8]  # mac
        self.timestamps = origin_list[9]  # 发生在给出数据区间的初始时间点
        self.campid = int(origin_list[10])  # 日志对应的项目ID
        self.creativeid = int(origin_list[11])
        self.mobile_os = origin_list[12]  # 5.0.2,设备OS版本信息，该值为原始值；
        self.mobile_type = origin_list[13]
        self.app_key_md5 = origin_list[14]  # 日志对应的app key信息；
        self.app_name_md5 = origin_list[15]  # 日志对应的app name信息
        self.placementid = origin_list[16]  # 日志对应的广告位信息
        self.ua = urllib.unquote(origin_list[17])
        self.mediaid = origin_list[18]
        self.os_type = origin_list[19]
        self.born_time = origin_list[20]

        self.label = int(origin_list[21])
